#!/usr/bin/ruby
# This program lists pathways present in a given organism
# Usage example: ruby kegg.request.rb eco

#require 'soap/wsdlDriver'
require 'bio'

wsdl = "http://soap.genome.jp/KEGG.wsdl"

#serv = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
#serv.generate_explicit_type = true

handl = Bio::KEGG::API.new

organism = ARGV[0]

list = handl.list_pathways(organism)
list.each do |path|
  print path.entry_id, "\t", path.definition, "\n"
end

